<?php

namespace Controller\Dog;

class Photo extends Base {

	public function actionIndex() {
		$this->setCurrentMenuKey('Blind');
		$params = $this->getRouteParams();
		$userId = !empty($params[0]) ? (int) $params[0] : 0;
		if (!$userId) {
			$this->throwException('参数错误');
		}
		$userInfo = $this->getUserDetailInfo($userId);
		if (!$userInfo) {
			$this->throwException('用户不存在');
		}
		$photos = \Business\User::instance()->getUserPhotosByUserId($userId);
		$this->assign('photos', $photos);
		$this->display();
	}
}